package com.tanhua.dubbo.mappers;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.Questionnaire;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface QuestionnaireMapper extends BaseMapper<Questionnaire> {

    @Select("SELECT * FROM tb_questionnaire WHERE level =#{level} ORDER BY RAND() LIMIT 1")
    Questionnaire randomSimple(String level);
}